package com.tangfuzhong.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.tangfuzhong.bean.Person;

public class IOCTest_00_xml {
	
	@SuppressWarnings("resource")
	public static void main(String[] args) {

		/**
		 * 1.
		 * spring boot以前的版本，
		 * spring用xml文件进行配置的:
		 * application.xml
		 * beans.xml
		 */

		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
		Person bean = (Person) applicationContext.getBean("person");
		System.out.println(bean);


	
	}

}
